All Questions
10 questions
6votes
1answer
285views
Send records to messaging queue using either of one policy
I have bunch of keys (clientKey) and values (processBytes) that I want to send to our messaging queue by packing them in one ...
3votes
1answer
288views
Managing socket pool per datacenter
I have a list of sockets per datacenter (in general, I have around three datacenter and each datacenter having 20 sockets, so in total I have around 60 sockets). Now I have 20 business threads which ...
2votes
1answer
7kviews
Send data on a socket from multiple threads
I have around 60 sockets, 20 business threads and 1 pinger timer thread and I want to make sure each of those thread works on different socket every time so I don't want to share same socket between ...
3votes
1answer
4kviews
Running multiple kafka consumers on the same box independent of each other
I have two Kafka consumer ConsumerA and ConsumerB. I want to run these two kafka consumers independent of each other on the same ...
2votes
1answer
58views
Is it bad practice to have executable code in my channel state object?
I have a CommunicationStateMachine object that's attached to my channels. It keeps track of who's turn it is to speak, how far along the conversation the server and ...
4votes
2answers
175views
Code organization when using threads
From OOP & OOD point of view, is it good idea to define Java-threads inside of the static method or in this case it's better to use instance-based method? ...
2votes
2answers
3kviews
Multithreaded report generation
I have a requirement where I have to generate some reports read from a database and write the data to Excel. I want your help in reviewing the following things in my code: Database connection ...
2votes
1answer
310views
Controller for a MUD client
I want to ensure that, as much as possible given my skill level, that I'm using relevant patterns correctly and following naming conventions. This is a controller for a poor-mans MUD client using ...
5votes
1answer
478views
Review of simple Java Actor library
How can I improve this code? Also available from git://github.com/edescourtis/actor.git . Actor.java ...
5votes
1answer
6kviews
Singleton class extending a parent class to utilise shared functionality
I have a singleton class which extends from an abstract java class. Two singleton classes extend from ItemImageThreadManager, the reason for this is to use shared ...